cmake_minimum_required(VERSION 3.10)
project(FileSysSimulate)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 添加头文件搜索路径
include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/includes
)

# 添加源文件
file(GLOB SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)

# 添加可执行文件
add_executable(init_disk init_disk.cpp ${SRC})
add_executable(test_disk_manager ${CMAKE_CURRENT_SOURCE_DIR}/test/disk_manager_test.cpp ${SRC})
add_executable(test_file_api ${CMAKE_CURRENT_SOURCE_DIR}/test/file_api_test.cpp ${SRC})
add_executable(test_consumer ${CMAKE_CURRENT_SOURCE_DIR}/test/consumer_test.cpp ${SRC})
add_executable(test_stress ${CMAKE_CURRENT_SOURCE_DIR}/test/stress_test.cpp ${SRC})

add_executable(ls ${CMAKE_CURRENT_SOURCE_DIR}/cmd/ls.cpp ${SRC})
add_executable(touch ${CMAKE_CURRENT_SOURCE_DIR}/cmd/touch.cpp ${SRC})
add_executable(cat ${CMAKE_CURRENT_SOURCE_DIR}/cmd/cat.cpp ${SRC})
add_executable(rm ${CMAKE_CURRENT_SOURCE_DIR}/cmd/rm.cpp ${SRC})